package com.jzbooks.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author mingPeng
 * @date 2021/5/3 23:21
 * @Description : 书籍表实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("book")
@ApiModel("书籍实体")
public class Book extends BaseEntity{

    @ApiModelProperty("书名")
    @TableField(value = "name")
    private String name;

    @ApiModelProperty("作者")
    @TableField(value = "author")
    private String author;

    @ApiModelProperty("书籍介绍")
    @TableField(value = "introduce")
    private String introduce;

    @ApiModelProperty("关联类型id")
    @TableField(value = "type_id")
    private Integer typeId;

    @ApiModelProperty("可借阅的数量")
    @TableField(value = "num")
    private Integer num;

    @ApiModelProperty("是否推荐此书籍,0推荐，1不推荐")
    @TableField(value = "recommend")
    private Byte recommend;

    @ApiModelProperty("书籍图片地址")
    @TableField(value = "img_src")
    private String imgSrc;

    @ApiModelProperty("已借阅数量")
    @TableField(value = "borrowing_num")
    private Integer borrowingNum;

    @ApiModelProperty("书籍评分")
    @TableField(value = "book_score")
    private float bookScore;

    @ApiModelProperty("出版社")
    @TableField(value = "press")
    private String press;

    @ApiModelProperty("书架号")
    @TableField(value = "bookshelf_num")
    private String bookshelfNum;

    @ApiModelProperty("评分人数")
    @TableField(value = "score_person_num")
    private Integer scorePersonNum;

    @ApiModelProperty("评论人数")
    @TableField(value = "comment_person_num")
    private Integer commentPersonNum;

    @ApiModelProperty("逻辑删除")
    @TableField(value = "deleted")
    @TableLogic
    private Integer deleted;

    public static final String COL_USERNAME = "name";

    public static final String COL_PASSWORD = "author";

    public static final String COL_NAME = "introduce";

    public static final String COL_SEX = "type_id";

    public static final String COL_PHONE_NUM = "phone_num";

    public static final String COL_EMAIL = "num";

    public static final String COL_RECOMMEND = "recommend";

    public static final String COL_IMG_SRC = "img_src";

    public static final String COL_BORROWING_NUM = "borrowing_num";

    public static final String COL_BOOK_SCORE = "book_score";

    public static final String COL_PRESS = "press";

    public static final String COL_BOOKSHELF_NUM = "bookshelf_num";

    public static final String COL_SCORE_PERSON_NUM = "score_person_num";

    public static final String COL_COMMENT_PERSON_NUM = "comment_person_num";

    public static final String COL_DELETED = "deleted";



}
